package oauth2.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class UserController {

    @GetMapping("/user")
    public String getUserName(HttpServletRequest request){
        return (String)request.getSession().getAttribute("user");
    }


    @GetMapping("/user2")
    public String getUserName2(HttpServletRequest request){
        return (String)request.getSession().getAttribute("user");
    }


    @GetMapping("/user3")
    public String getUserName3(HttpServletRequest request){
        return (String)request.getSession().getAttribute("user");
    }


    //dev_yanghq


    //dev_tony
}

